<!DOCTYPE html>
<html>
<head>
    <title>激活返现</title>
    <#include "/header.html">
    <link type="text/css" rel="stylesheet" href="${request.contextPath}/statics/plugins/layui/css/layui.css">
    <style>
        .grid-btn .form-control {
            margin-left: 10px;
        }
        th {
            text-align: center;
        }
    </style>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <form class="form-inline">

                <div class="form-group">
                    <input type="text" class=" col-md-1 form-control" id="startTime"
                           placeholder="请选择开始日期" readonly>
                    <input type="text" class=" col-md-1 form-control" id="endTime"
                           placeholder="请选择结束日期" readonly>

                    <input type="text" placeholder="请输入SN" v-model="q.sn" class="form-control">
                    <input type="text" placeholder="请输入合伙人姓名" v-model="q.name" class="form-control">

                    <input type="text" placeholder="请输入合伙人手机" v-model="q.phone" class="form-control">

                    <input type="button" class="btn btn-default" @click="query" value="查询"/>
                    <input type="button" class="btn btn-default" @click="clean" value="刷新"/>
                    <input type="button" class="btn btn-default" @click="add" value="添加"/>
                </div>
            </form>
            <!--<#if shiro.hasPermission("sys:agent:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            </#if>-->
            <!--<#if shiro.hasPermission("sys:agent:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            </#if>
            <#if shiro.hasPermission("sys:user:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
            </#if>-->
        </div>
        <table id="jqGrid"></table>

        <div id="jqGridPager"></div>
    </div>


    <div v-show="showAdd" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
            <div class="form-group" v-show="!addById">
                <div class="col-sm-2 control-label"> 合伙人id</div>
                <div class="col-sm-10">
                    <input type="text" v-model="flowActiv.agentId" class="form-control"/>
                </div>
            </div>
            <div class="form-group" v-show="addById">
                <div class="col-sm-2 control-label"> 合伙人姓名:</div>
                <div class="col-sm-10">
                    <input type="text" v-model="flowActiv.name" class="form-control check"/>
                </div>
            </div>
            <div class="form-group" v-show="addById">
                <div class="col-sm-2 control-label"> 合伙人手机号码:</div>
                <div class="col-sm-10">
                    <input type="text" v-model="flowActiv.phone" class="form-control check"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">返现时间:</div>
                <div class="col-sm-10">
                    <input type="text" class="jeinput col-md-1 form-control" id="addTime" placeholder="活动开始时间" readonly>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">返现金额:</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="flowActiv.amount"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label">激活终端:</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="flowActiv.sn"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-2 control-label">参与金额:</div>
                <div class="col-sm-10">
                    <input type="text" class="form-control" v-model="flowActiv.partAmount"/>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="insert" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>


<script src="${request.contextPath}/statics/js/modules/finance/flowActiv.js?_${.now?long}"></script>
<script src="${request.contextPath}/statics/plugins/layui/layui.js"></script>
<script>
    //模块化时间空间laydate
    layui.use('laydate', function () {
        var laydate = layui.laydate;

        //常规用法
        laydate.render({
            elem: '#startTime',
            format: 'yyyy-MM-dd',
            done: function (value, date, endDate) {
                vm.q.startTime = value
            }
        });
        laydate.render({
            elem: '#endTime',
            format: 'yyyy-MM-dd',
            done: function (value, date, endDate) {
                vm.q.endTime = value
            }
        });
        laydate.render({
            elem: '#addTime',
            format: 'yyyy-MM-dd',
            done: function (value, date, endDate) {
                vm.flowActiv.activDate = value;
            }
        });
    });
</script>
</body>
</html>